package com.aliyun.messagemgt.dto;

import com.aliyun.messagemgt.common.dto.base.UserInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 消息源
 * @author changcong
 *
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "发送任务")
public class MsgSource extends UserInfo {

	@ApiModelProperty(value = "发送任务自增ID")
	private Long msgSourceId;

	@ApiModelProperty(value = "发送任务编码")
    private String sourceCode;

	@ApiModelProperty(value = "消息类型")
	private String messageType;

	@ApiModelProperty(value = "发送任务名称")
    private String sourceName;

	@ApiModelProperty(value = "数据源编码")
	private String messageCode;

	@ApiModelProperty(value = "数据源名称")
	private String messageName;

	@ApiModelProperty(value = "场景编码")
	private String sceneCode;

	@ApiModelProperty(value = "场景名称")
	private String sceneName;

	@ApiModelProperty(value = "渠道类型 1 政务微信 2 app 3 网页客户端 4 短信 5 邮件")
    private Integer pushChannelType;

	@ApiModelProperty(value = "渠道ID")
    private Long pushChannelId;

	@ApiModelProperty(value = "渠道名称")
    private String pushChannelName;

	@ApiModelProperty(value = "渠道编码")
	private String pushChannelCode;

	@ApiModelProperty(value = "模板编码")
	private String templateCode;

	@ApiModelProperty(value = "模板id")
	private Long templateId;

	@ApiModelProperty(value = "模板名称")
	private String templateName;

	@ApiModelProperty(value = "接收组编码")
	private String receiveGroupCode;

	@ApiModelProperty(value = "管理员 List<{key； name：}>")
    private String owner;

	@ApiModelProperty(value = "归属部门编码")
    private String ownerDept;

	@ApiModelProperty(value = "归属部门名称")
    private String ownerDeptName;

	@ApiModelProperty(value = "消息源描述 ")
    private String sourceDescription;

	@ApiModelProperty(value = "重发推送渠道ID")
    private Integer resendChannelId;

	@ApiModelProperty(value = "重发推送渠道名称")
    private String resendChannelName;

	@ApiModelProperty(value = "流控时间单位 1 分钟 2 小时 3 天")
    private Integer flowControlTimeUnit;
    

	@ApiModelProperty(value = "流控单位时间内限制")
    private Integer flowControlCountLimit;

	@ApiModelProperty(value = "有效期开始时间")
	@JsonFormat( pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date startTime;

	@ApiModelProperty(value = "有效期结束时间")
	@JsonFormat( pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date endTime;

	@ApiModelProperty(value = "删除状态 0未删除，1已删除")
    private Integer stateDelete;
    
    private Date timeDelete;
    
    private Date timeCreate;
    
    private String userCreate;
    
    private Date timeUpdate;
    
    private String userUpdate;

    private Integer templateActive;

	@ApiModelProperty(value = "消息源有效期类型：1：不限 2：一年有效期 3：一个月 4：一周 5：当天有效 6：自定义")
	private Integer sourceType;

	@ApiModelProperty(value = "是否启用  Y-启用 N-停用")
	private String isEnabled;
	@ApiModelProperty(value = "租户code")
	private String tenantCode;

	@ApiModelProperty(value = "失败重发次数")
	private Integer failureResendTimes;

	@ApiModelProperty(value = "失败重发时间间隔，单位秒")
	private Integer failureResendInterval;
}
